package Chapter6;

public class Exam {
	
	public static void main(String[] args){
		Room room1 = new Room();
		Room room2 = new Room();
		Room room3 = new Room();
		
		room1.num = 103;
		room2.num = 104;
		room3.num = 105;
		
		Room[] rooms = {room1, room2, room3};
		for(int i = 0; i < rooms.length; i++){
			rooms[i].klaxon();
		}
		
		System.out.println();
		
		
	}

}
